#include "systemc.h"
#include "input.cpp"
#include "output.cpp"

#define ITERATIONS 10

int sc_main(int argc, char* argv[]){
	
	sc_signal<bool> clock;
	sc_signal<bool> req;
	sc_signal<bool> ack;
	sc_signal< sc_lv<8> > data;
		 
	output OUTPUT("output");
	OUTPUT.clock(clock);
	OUTPUT.ack(ack); 
	OUTPUT.req(req);
	OUTPUT.data(data);
	 
	OUTPUT.interHorizontal = "0001";
	OUTPUT.interVertical = "0010"; 
	OUTPUT.sendFlag = "1";
	OUTPUT.interNumber = "00000100";
	ack = 0; 
	 
	sc_start(1,SC_NS);
	sc_trace_file *wf = sc_create_vcd_trace_file("NoC");
	sc_trace(wf, clock, "clock");
	sc_trace(wf, ack , "ack");
	sc_trace(wf, req , "req");
	sc_trace(wf, data , "data");

	int i;
	for (i=0;i<ITERATIONS;i++){   
		clock = 0; 
		sc_start(1,SC_NS);
		clock=1;
		sc_start(1,SC_NS);
	}

	system("PAUSE");
	return(0);
}